package com.example.shangjinlieren;

import com.example.shangjinlieren.slice.MainAbilitySlice;
import com.example.shangjinlieren.slice.MainMoneyListDetailSlice;
import com.example.shangjinlieren.slice.VideoAbilitySlice;
import com.example.shangjinlieren.theme.MyColors;
import ohos.aafwk.ability.fraction.FractionAbility;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.utils.Color;
import ohos.agp.window.service.Window;
import ohos.agp.window.service.WindowManager;

public class MainAbility extends FractionAbility {
    @Override
    public void onStart(Intent intent) {
        getWindow().addFlags(WindowManager.LayoutConfig.MARK_TRANSLUCENT_STATUS);
        super.onStart(intent);
        super.setMainRoute(MainAbilitySlice.class.getName());
        /**
         * 设置路由
         */
        //列表详情
//        addActionRoute("action.MoneyList.detail", MainMoneyListDetailSlice.class.getName());
//        addActionRoute("action.list.money", MainAbilitySlice.class.getName());
//        addActionRoute("action.list.money_video", VideoAbilitySlice.class.getName());
        Window window = getWindow();
        window.setStatusBarVisibility(0);
        window.setStatusBarColor(MyColors.themeColor);
//        Operation operationBuilder = new Intent.OperationBuilder()
//                .withBundleName("com.example.shangjinlieren")
//                .withAbilityName("com.example.shangjinlieren.MoneyDetail")
//                .build();
//        intent.setOperation(operationBuilder);
//        startAbility(intent);
//        String index = intent.getStringParam("index");
//        System.out.println("index========"+index);
    }
}
